<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="base.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link rel="stylesheet" type="text/css" href="style/style.css"/>
<style type="text/css" >
			span{
				display:none;
			}
		</style>
		<script type="text/javascript" src="${basePath }/script/jquery-1.3.2.min.js"></script>
		<script type="text/javascript">
			$(document).ready(function(){
				$("#loginForm").submit(function(){
					if($.trim($("#name").val()) == null || !$.trim($("#name").val()).match(/([\w]){4,12}$/)){
						$(".namemsg").css("display","block");
						return false;
					}
					if($.trim($("#password").val()) == null || !$.trim($("#password").val()).match(/([\w]){6,15}$/)){
					 	$(".passwordmsg").css("display","block");
					 	return false;
					}
					return true;
					});
				});
			</script>
</head>

<body>
<%@include file="template/top.jsp" %>
<div id="contain">
<div class="nav">
    	<a href="index.jspx">论坛首页</a>
        &gt;&gt;
       登录页
  </div>	
  <div class="board">
  	<div class="board_title">
    	登录论坛
    </div>
    <div class="reg_login">
    	<div class="left">
        	<c:if test="${not empty msg }">
        		<div class="error" style="width:300px;">
            		${msg }
            	</div>
            	<c:remove var="msg" scope="session" />
        	</c:if>
        	<form action="user.jspx" method="post" id="loginForm">
        		<input type="hidden" name="_method" value="login"/>
            	<label>用户名：</label>
                <input type="text" name="name" id="name" class="text"/>
                <span class="namemsg">用户名只能由4-12位英文字母、数字或下划线组成</span>
                <label>密码：</label>
                <input type="password" name="password" id="password" class="text"/>
                <span class="passwordmsg">密码只能由6-15位英文字母、数字及下划线组成</span>
                <div>
                	<input type="submit" value="登录"/>
                </div>
                
            </form>
        </div>
        <div class="right">
        	<h3>没有账户</h3>
            还没有凯盛论坛的账户？还不快<a href="index.jspx?_method=reg">注册</a>
        </div>
    </div>
  </div>
</div>

<%@include file="template/footer.jsp" %>

</body>
</html>
